//
// Created by lzw on 24-10-19.
//


#include "parser.h"

struct s_parser new_parser(struct s_lexer *l)
{
    struct s_parser p;
    p.lexer = *l;
    p.current = s_lexer_next_token(l);
    p.peek = s_lexer_next_token(l);
    return p;
}

void next_token(struct s_parser *p){
    p->current = p->peek;
    p->peek = s_lexer_next_token(&p->lexer);
}


